import { createRouter, createWebHashHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    name: 'home',
    component: () => import(/* webpackChunkName: "home" */ '../views/Home.vue')
  },
  {
    path: '/about',
    name: 'about',
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  },
  {
    path: '/cous',
    name: 'cous',
    component: () => import(/* webpackChunkName: "cous" */ '../views/Cous.vue')
  },
  {
    path: '/pro',
    name: 'pro',
    component: () => import(/* webpackChunkName: "about" */ '../views/Pro.vue')
  },
  {
    path: '/todo',
    name: 'todo',
    component: () => import(/* webpackChunkName: "todo" */ '../views/Todo.vue')
  },
  {
    path: '/picon',
    name: 'picon',
    component: () => import(/* webpackChunkName: "picon" */ '../views/Picon.vue')
  },
  {
    path: '/clist',
    name: 'clist',
    component: () => import(/* webpackChunkName: "clist" */ '../views/Clist.vue')
  },
  {
    path: '/cdetial/:id',
    name: 'cdetial',
    component: () => import(/* webpackChunkName: "cdetial" */ '../views/Cdetial.vue')
  }
]

// new VueRouter  =>  createRouter hooks
const router = createRouter({
  // createWebHashHistory Hooks
  history: createWebHashHistory(),
  routes
})

export default router
